﻿using Infrastructure.Configuration;
using Infrastructure.Persistence;
using Infrastructure.Storage;
using Ninject;

namespace SocialFront.Core
{
    public class Facade
    {
        public static IKernel Kernel { get; set; }

        public static IRepository Repository
        {
            get
            {
                return Kernel.Get<IRepository>();
            }
        }

        public static IReadOnlyRepository ReadOnlyRepository
        {
            get
            {
                return Kernel.Get<IReadOnlyRepository>();
            }
        }


        public static IApplicationSettings ApplicationSettings
        {
            get
            {
                return Kernel.Get<IApplicationSettings>();
            }
        }

        public static IThreadStorage ThreadStorage
        {
            get
            {
                return Kernel.Get<IThreadStorage>();
            }
        }

        public static IHttpContextStorage HttpContextStorage
        {
            get
            {
                return Kernel.Get<IHttpContextStorage>();
            }
        }

        public static ISessionStorage SessionStorage
        {
            get
            {
                return Kernel.Get<ISessionStorage>();
            }
        }

        public static ICacheStorage CacheStorage
        {
            get
            {
                return Kernel.Get<ICacheStorage>();
            }
        }
    }
}